import React, { Component } from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import NavBar from './components/NavBar'
import Home from './pages/Home'
import Recharge from './pages/Recharge'
import BookShelf from './pages/BookShelf'
import Mine from './pages/Mine'
import './App.css'
class App extends Component {
  render() {
    return (
      <div className="app-container">
         <NavBar/>
          
         <Switch>
              <Route path="/home" component={Home}></Route>
              <Route path="/recharge" component={Recharge}></Route>
              <Route path="/bookshelf" component={BookShelf}></Route>
              <Route path="/mine" component={Mine}></Route>
         </Switch>
          <Redirect to="/home"></Redirect>
      </div>
    );
  }
}

export default App;